package network;

import gui.Forme;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.Map;

public interface IProcessus extends Remote {

	public int getId() throws RemoteException;
	
    public void timeout(int idSource) throws RemoteException;

	public void addProcessus(int idSource) throws RemoteException;
    public void responseSearchMaster(int idSource) throws RemoteException;
    
	public void receiveDrawingRequestMaster(int idSource) throws RemoteException;
	public void receiveDrawingResponse(int idSource, boolean scAvailable) throws RemoteException;
	public void receiveEndOfSC(int idSource) throws RemoteException;
	
	public void receiveForme(int idSource, int idForme, Forme forme) throws RemoteException;
	public void receiveRequestListOfForme(int idSource) throws RemoteException;
	public void receiveListOfForme(int idSource, Map<Integer,Forme> listOfForme)  throws RemoteException;
	
	// BULLY
	public void msgAck() throws RemoteException;
	public void msgMaster(int proc) throws RemoteException;
	public void msgElection(int proc) throws RemoteException;
	public void receiveAckForme(int idSource) throws RemoteException;

	// CandR
	public void getTok(int val) throws RemoteException;
	public void timeoutCR(int idSource) throws RemoteException;
	public void startElectionCR() throws RemoteException;

	public void receiveLeader(int idLeader) throws RemoteException;

	public void getTokv2(int val) throws RemoteException;
}
